package com.diankangwo.service.impl;

import com.diankangwo.dao.DistributionDAO;
import com.diankangwo.domain.Distribution;
import com.diankangwo.service.DistributionServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by wuye on 2017/10/18.
 */
@Service
public class DistributionServiceImpl implements DistributionServices {

    @Autowired
    private DistributionDAO distributionDAO;

    /**
     * 添加一个佣金明细
     * @return
     */
    public boolean saveDistribution(Distribution distribution){
        try {
            distributionDAO.saveDistribution(distribution);
            return true;
        }catch (Exception e){
            e.printStackTrace();
            return false;
        }
    }
}
